#include "CGrid.h"

CGrid::CGrid() : top(NULL), left(NULL), right(NULL), bottom(NULL),
isSelected(false), hasCheckedDrop(false), row(0), col(0), _type(NONE)
{

}

CGrid::~CGrid()
{

}

void CGrid::setType(GridType type)
{
	if (_type != type)
	{
		_type = type;
		switch (_type)
		{
		case BLUE:
			initWithFile("blue.png");
			break;
		case GREEN:
			initWithFile("green.png");
			break;
		case PURPLE:
			initWithFile("purple.png");
			break;
		case RED:
			initWithFile("red.png");
			break;
		case YELLOW:
			initWithFile("yellow.png");
			break;
		default:
			initWithFile(NULL);
			break;
		}
	}
}

